package com.jingbian.cppccbackend.mapper.user;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jingbian.cppccbackend.entity.Activities;
import com.jingbian.cppccbackend.entity.dto.ActivityJoinedDTO;
import com.jingbian.cppccbackend.entity.dto.EnableActivityDTO;
import com.jingbian.cppccbackend.entity.dto.MyActivitiesDTO;
import com.jingbian.cppccbackend.vo.CanActivitiesVO;
import com.jingbian.cppccbackend.vo.CreateActivitiesVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author pum
 * @since 2025-02-27
 */
@Mapper
public interface ActivitiesMapper extends BaseMapper<Activities> {

  List<Activities> getMyActivity(@Param("params")MyActivitiesDTO myActivitiesDTO);

  CreateActivitiesVO selectActivity(Integer aid);

  List<Activities> getEnableList(@Param("params") EnableActivityDTO enableActivityDTO);

  CanActivitiesVO canActivityDetail(Integer aid, Integer userId);

  List<Activities> getAlreadyJoin(@Param("params") ActivityJoinedDTO activityJoinedDTO);

  void insertActivity(Activities activities);
}
